// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Eql;

public sealed partial class HitsEvent<TEvent>
{
	[JsonInclude, JsonPropertyName("fields")]
	[ReadOnlyFieldDictionaryConverter(typeof(IReadOnlyCollection<object>))]
	public IReadOnlyDictionary<Elastic.Clients.Elasticsearch.Field, IReadOnlyCollection<object>>? Fields { get; init; }

	/// <summary>
	/// <para>
	/// Unique identifier for the event. This ID is only unique within the index.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("_id")]
	public string Id { get; init; }

	/// <summary>
	/// <para>
	/// Name of the index containing the event.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("_index")]
	public string Index { get; init; }

	/// <summary>
	/// <para>
	/// Set to <c>true</c> for events in a timespan-constrained sequence that do not meet a given condition.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("missing")]
	public bool? Missing { get; init; }

	/// <summary>
	/// <para>
	/// Original JSON body passed for the event at index time.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("_source")]
	[SourceConverter]
	public TEvent Source { get; init; }
}